<?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('common/header', TEMPLATE_INCLUDEPATH)) : (include template('common/header', TEMPLATE_INCLUDEPATH));?>
<link rel="stylesheet" type="text/css" href="../addons/yzzc_sun_plugin_distribution/template/style/style.css">
<style type="text/css">
	.table-responsive{border: 1px solid #e7e7eb;}
	.table-responsive th{background-color: #f4f6f9;border-right: 1px solid #e7e7eb}
	.table-responsive td{border-right: 1px solid #e7e7eb}
	.table-responsive .btn-primary{border:0; padding: 3px 8px; margin-bottom: 3px;}
</style>
<ul class="we7-page-tab">
	<li class="<?php  if($ordertype==1) { ?>active<?php  } ?>"><a href="<?php  echo $this->createWeburl('distribution_order', array('ordertype'=>1));?>">短租</a></li>
	<li class="<?php  if($ordertype==2) { ?>active<?php  } ?>"><a href="<?php  echo $this->createWeburl('distribution_order', array('ordertype'=>2));?>">长租</a></li> 
</ul>
<div class="clearfix" style="margin-left: -20px;margin-right: -20px;">
	<table class="table table-responsive">
		<?php  if($ordertype==6) { ?>
			<tr>
				<th>激活码（线上购买）</th>
				<th>会员信息</th>
				<th>金额</th>
				<th>vip名称</th>
				<th>分销情况</th>
			</tr>
			<?php  if(is_array($list)) { foreach($list as $index => $val) { ?>
				<tr>
					<td>
						<?php  echo $val['vc_code'];?>
					</td>
					<td>
						<img src="<?php  echo $val['img'];?>" height="30"><br>
						微信昵称：<?php  echo $val['name'];?><br>
					</td>
					<td>
						<?php  echo $val['money'];?>元
					</td>
					<td>
						<?php  echo $val['viptitle'];?>
					</td>
					<td>
						一级佣金：<?php  echo $val["first_price"];?>元
						<?php  if($d_set["status"]>=2) { ?><br>二级佣金：<?php  echo $val['second_price'];?>元<?php  } ?>
						<?php  if($d_set["status"]>=3) { ?><br>三级佣金：<?php  echo $val['third_price'];?>元<?php  } ?>
					</td>
				</tr>
			<?php  } } ?>
		<?php  } else { ?>
			<tr>
				<th>订单号</th>
				<th>商品信息</th>
				<th>金额(定金/续租)</th>
				<th>订单状态</th>
				<th>分销情况</th>
			</tr>
			<?php  if(is_array($list)) { foreach($list as $index => $val) { ?>
				<tr>
					<td>
						<?php  echo $val['orderformid'];?>
					</td>
					<td>
						<!--<img src="<?php  echo $_W['attachurl'];?><?php  echo $val['goodsimg'];?>" height="30"><br>-->
						<?php  echo $val['title'];?><br>
						数量：<?php  echo $val['good_total_num'];?>
					</td>
					<td>
						<?php  echo $val['prepay_money'];?>/<?php  echo $val['xzmoney'];?>元
					</td>
					<td>
						<?php  echo $status[$val['order_status']];?>
					</td>
					<td>
						一级佣金：<?php  echo $val["first_price"];?>元
						<?php  if($d_set["status"]>=2) { ?><br>二级佣金：<?php  echo $val['second_price'];?>元<?php  } ?>
						<?php  if($d_set["status"]>=3) { ?><br>三级佣金：<?php  echo $val['third_price'];?>元<?php  } ?>
					</td>
				</tr>
			<?php  } } ?>
		<?php  } ?>
	</table>

	<div id="fenye">

	<?php  echo $pager;?>

	</div>
</div>
<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('common/footer', TEMPLATE_INCLUDEPATH)) : (include template('common/footer', TEMPLATE_INCLUDEPATH));?>